package com.example.demo.net.socket;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @author MarioZzz
 * @create 2023-08-07 10:16
 */
public class InetAddressTest {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress inetAddress = InetAddress.getByName("www.baidu.com");
        System.out.println(inetAddress.getHostAddress());

    }
}
